﻿
using System;
using System.Collections.Generic;
using System.Text;
using SolrExample.Interface.DomainObject;

namespace SolrExample.Data
{
	internal partial class JobAd : IJobAd, IIndexRecord
	{
					private string countryCode;
					private int accountNum;
					private long adsID;
					private string adsRef;
					private string company;
					private string companyAltLang;
					private string companyDesc;
					private DateTime? expiryDate;
					private DateTime? firstPostDate;
					private char jobAdStatus;
					private IList<int> jobCategories;
					private string posSeek;
				
		public JobAd(
							string countryCode,
							int accountNum,
							long adsID,
							string adsRef,
							string company,
							string companyAltLang,
							string companyDesc,
							DateTime? expiryDate,
							DateTime? firstPostDate,
							char jobAdStatus,
							IList<int> jobCategories,
							string posSeek
						 
		)
		{
							this.countryCode = countryCode;
							this.accountNum = accountNum;
							this.adsID = adsID;
							this.adsRef = adsRef;
							this.company = company;
							this.companyAltLang = companyAltLang;
							this.companyDesc = companyDesc;
							this.expiryDate = expiryDate;
							this.firstPostDate = firstPostDate;
							this.jobAdStatus = jobAdStatus;
							this.jobCategories = jobCategories;
							if(this.jobCategories == null)
				{
					this.jobCategories = new int[0];
				}
							this.posSeek = posSeek;
					}
		
					public string CountryCode
			{
				get
				{
					return this.countryCode;
				}
			}
					public int AccountNum
			{
				get
				{
					return this.accountNum;
				}
			}
					public long AdsID
			{
				get
				{
					return this.adsID;
				}
			}
					public string AdsRef
			{
				get
				{
					return this.adsRef;
				}
			}
					public string Company
			{
				get
				{
					return this.company;
				}
			}
					public string CompanyAltLang
			{
				get
				{
					return this.companyAltLang;
				}
			}
					public string CompanyDesc
			{
				get
				{
					return this.companyDesc;
				}
			}
					public DateTime? ExpiryDate
			{
				get
				{
					return this.expiryDate;
				}
			}
					public DateTime? FirstPostDate
			{
				get
				{
					return this.firstPostDate;
				}
			}
					public char JobAdStatus
			{
				get
				{
					return this.jobAdStatus;
				}
			}
					public IList<int> JobCategories
			{
				get
				{
					return this.jobCategories;
				}
			}
					public string PosSeek
			{
				get
				{
					return this.posSeek;
				}
			}
				
		private IDictionary<string, object> fields = null;
		public IDictionary<string, object> Fields
        {
            get
            {
				if (fields == null)
				{
					fields = new Dictionary<string, object>()
					{
													{ "CountryCode", this.CountryCode },
													{ "AccountNum", this.AccountNum },
													{ "AdsID", this.AdsID },
													{ "AdsRef", this.AdsRef },
													{ "Company", this.Company },
													{ "CompanyAltLang", this.CompanyAltLang },
													{ "CompanyDesc", this.CompanyDesc },
													{ "ExpiryDate", this.ExpiryDate },
													{ "FirstPostDate", this.FirstPostDate },
													{ "JobAdStatus", this.JobAdStatus },
													{ "JobCategories", this.JobCategories },
													{ "PosSeek", this.PosSeek }
											};
				}
				return fields;
            }
        }
	}
}

